package online.foxnull2.common.exception;

public enum BizCodeEnum {
    UNKNOWN_EXCEPTION(10000, "system unknown exception"),
    VALID_EXCEPTION(10001, "methodArgumentNotValidException"),
    EMAIL_CODE_EXCEPTION(10002, "email code exception"),
    TOO_MANY_REQUEST(10003, "too many request"),
    PRODUCT_UP_EXCEPTION(11000, "product up exception"),
    USERNAME_EXIST_EXCEPTION(15001, "username exist exception"),
    EMAIL_EXIST_EXCEPTION(15002, "email exist exception"),
    USERNAME_OR_PASSWORD_INVALID_EXCEPTION(15003, "username or password invalid"),
    STOCK_INSUFFICIENT_EXCEPTION(21000, "stock insufficient exception");

    private final int code;
    private final String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
